<?php
    include_once('../../src/classes/class.mysql.php');
    
    $comtec_id_configman = $_GET['id'];
   
    $db = new MySQL();
    
    $texto = "SELECT comtec_id_configman,configman_name, maintainment_period, maintainment_period_date, maintainment_day
              FROM configman
              WHERE comtec_id_configman=".$comtec_id_configman;
    
    $result = $db->fetch_array($db->query($texto));
    $comtec_id_configman = $result['comtec_id_configman'];
    $configman_name = $result['configman_name'];
    $maintainment_period = $result['maintainment_period'];
    $maintainment_period_date = $result['maintainment_period_date'];
    $maintainment_day = $result['maintainment_day'];
?>
<fieldset class="curved">
 <legend>Editar</legend>
  <table style="margin: 10px auto; border-spacing: 10px;">
   <tr>
    <td width="200">Codigo</td> 
    <td><input type="text" id="comtec_id_configman" DISABLED size="40" value="<?=$comtec_id_configman?>" /></td>
   </tr>
   <tr>
    <td width="200">Nombre Configuraci&oacute;n</td>
    <td><input type="text" maxlength="100" id="configman_name" size="40" value="<?=$configman_name;?>" /></td>
   </tr>
   <tr> 
    <td width="200">Per&iacute;odo de mantenci&oacute;n</td>
    <td><input type="text" id="maintainment_period" size="40" value="<?=$maintainment_period;?>" /> (en d&iacute;as) </td>
   </tr>  
   <tr>
    <td width="200">D&iacute;a de mantenci&oacute;n</td>
    <td><input type="text" id="maintainment_day" size="40" value="<?=$maintainment_day;?>" /></td>
   </tr> 
   <tr>
    <td width="200">Detalle de mantenci&oacute;n</td>
    <td><textarea id="maintainment_period_date" rows="3" cols="37" style="resize:none" ><?=$maintainment_period_date;?></textarea></td>
   </tr>
   <tr>
     <td>
         <input type="button" id="edit" value="Editar" onclick="javascript:editConfigman(<?=$comtec_id_configman;?>)" />
         <input type="button" value="Cancelar" onclick="javascript:loadConfigmans();" />
     </td>
   </tr>
  </table>
 <div id="result"></div> 
</fieldset>
